import { request } from "@umijs/max";
import { stringify } from "qs";
//楼层分页列表
export const getFloorPage = (params: API.FloorPage) =>
  request(`/floor/page?${stringify(params)}`, {
    method: "GET",
  });
//新增楼层
export const addFloor = (params: API.FloorInfo) =>
  request(`/floor/save`, {
    method: "POST",
    data: params,
  });
//修改楼层
export const editFloor = (params: API.FloorInfo) =>
  request(`/floor/edit`, {
    method: "POST",
    data: params,
  });
//查看楼层详情
export const getFloorDetail = (floorId: number) =>
  request(`/floor/query?floorId=${floorId}`, {
    method: "GET",
  });
//删除楼层
export const delFloor = (floorIdArr: number[]) =>
  request(`/floor/del`, {
    method: "POST",
    data: { items: floorIdArr },
  });

//查询楼层列表
export const getFloorList = () =>
  request("/floor/queryList", {
    method: "GET",
  });
